﻿using System.Text.RegularExpressions;

namespace Oxage.CNC.Models
{
	public class XamlPathDataCodeCloseInline : XamlPathDataCodeInline
	{
		#region Constructors
		public XamlPathDataCodeCloseInline()
		{
		}

		public XamlPathDataCodeCloseInline(string inline)
		{
			Parse(inline);
		}
		#endregion

		#region Public methods
		public override void Parse(string inline)
		{
			var match = Regex.Match(inline, @"(?<code>\w)", RegexOptions.IgnoreCase);
			if (match.Success)
			{
				this.Code = match.Groups["code"].Value[0];
			}
		}

		public override string ToString()
		{
			return "Z";
		}
		#endregion
	}
}
